package com.gla.Controller;

import com.gla.domain.Commodity;
import com.gla.domain.Shop;
import com.gla.domain.Video;
import com.gla.result.Result;
import com.gla.service.VideoService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@CrossOrigin
@RestController
@RequestMapping("/Video")
public class VideoController {
    @Resource
    VideoService videoService;

    @GetMapping("/videoAllShop")
    public Result getAllShop(){
        List<Video> videoList = videoService.getAllShop();
        return Result.succeed(videoList);
    }

    @GetMapping("/getPet")
    public Result getPet(){
        List<Commodity> petList = videoService.getPet();
        return Result.succeed(petList);
    }

    @GetMapping("/getPetGoods")
    public Result getPetGoods(){
        List<Commodity> petGoodsList = videoService.getPetGoods();
        return Result.succeed(petGoodsList);
    }
}
